package hos.http;

import hos.http.HttpConstant;

/**
 * <p>Title: HttpErrorType </p>
 * <p>Description:  </p>
 * <p>Company: www.mapuni.com </p>
 *
 * @author : 蔡俊峰
 * @version : 1.0
 * @date : 2023/11/22 18:57
 */
public enum HttpErrorType {

    timeout(HttpConstant.SERVER_TIME_OUT),
    certificate(HttpConstant.SERVER_CERTIFICATE),
    response(HttpConstant.SERVER_ERROR),
    cancel(HttpConstant.SERVER_CANCEL),
    connection(HttpConstant.SERVER_CONNECTION),
    unknown(HttpConstant.UNKNOWN_ERROR),
    converter(HttpConstant.DATA_CONVERT),
    download(HttpConstant.DATA_DOWNLOAD_ERROR),
    upload(HttpConstant.DATA_UPLOAD_ERROR),
    failure(HttpConstant.SERVER_ERROR),
    server(HttpConstant.SERVER_ERROR),
    network(HttpConstant.NETWORK_ERROR),
    param(HttpConstant.REQUEST_PARAMS),
    urlParse(HttpConstant.REQUEST_URL),
    result(HttpConstant.SERVER_ERROR),
    resultNull(HttpConstant.DATA_EMPTY);


    private final String message;

    HttpErrorType(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }
}
